/*
 * AGENT SHERPA
 *  
 * Assignement 2 of the Agent Oriented Software Engineering Course
 * M.Sc. in Advanced Software Engineering (Part-time)
 * University College Dublin www.ucd.ie
 *
 * Copyright (c) 2007 Chris Walsh, Aidan Morrisy and Iain Hull.
 * All rights reserved.
 */

package org.agentsherpa;

import com.agentfactory.platform.interfaces.Actuator;
import com.agentfactory.platform.logic.FOS;

/**
 *
 * @author  Aidan
 */
public class AddDroneActuator extends Actuator {
    
    /** Creates a new instance of AddDroneActuator */
    public AddDroneActuator() {
        super();
    }
    

    
        public boolean act(FOS action) {
        String agent = action.argAt(0).toString();
        String address = action.argAt(1).toString();
        
        ControlAgentModule module = (ControlAgentModule)getModuleByName("controlagentmodule");
        if (module != null) {
            module.addAgent(agent, address);
            return true;
        } 
        return false;
    }
}
